import { Injectable } from '@angular/core';
import {Observable} from "rxjs/Observable";
import {MsgResult} from "../../../../models/msg-result";
import {DamAPI} from "../../peach-constants";
import {RequestUtil} from "../../../../util/request-util";

@Injectable()
export class ReportDailyService {

  constructor(
    private requestUtil : RequestUtil
  ) { }

  //不同用户不同站点
  getUserSiteData():Observable<MsgResult>{
    return this.requestUtil.get(DamAPI.getUserSite);
  }


  getReportDailyData(obj):Observable<MsgResult>{
    let params = "format=json"+"&startTime="+obj.startTime+"&endTime="+obj.endTime+"&pointType="+obj.pointType;
    return this.requestUtil.get(DamAPI.reportDailyData,params);
  }


}
